#include<stdio.h>
#include<conio.h>
#include<math.h>
struct namsinh
{
       unsigned char ngay;
       unsigned char thang;
       unsigned int nam;
};
struct hocsinh
{
       char hoten[50];
       namsinh ns;
       int toan;
       int ly;
       int hoa;
       int tong;
};
void nhap(hocsinh &s)
{
     printf("\n nhap ho ten");
     gets(s.hoten);
     printf("\n nhap ngay sinh");
     scanf("%d/%d/%d",&s.ns.ngay,&s.ns.thang,&s.ns.nam);
     printf("\n nhap diem toan");
     scanf("%d",&s.toan);
     printf("\n nhap diem ly");
     scanf("%d",&s.ly);
     printf("\n nhap diem hoa");
     scanf("%d",&s.hoa);
}
void xuat(hocsinh s)
{
     printf("\n HOTEN | NGAYSINH | TOAN | LY | HOA \n");
     printf("%5s|%d/%d/%d|%d|%d|%d",s.hoten,s.ns.ngay,s.ns.thang,s.ns.nam,s.toan,s.ly,s.hoa);
}
int main()
{
    hocsinh x;
    nhap(x);
    xuat(x);
    getch();
}
